#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>

int main()
{
    long int n, i, j, e, c, d = 0;
    scanf("%ld", &n);
    i = n - 1, j = n - 2;
    long int a[i], b[j];
    if (n == 1)
        d = 1;
    for (e = 0; e < n; e++)
    {
        scanf("%ld", &a[e]);
        if (e >= 1)
        {
            b[e - 1] = fabs(a[e] - a[e - 1]);
        }
    }
    for (e = 1; e <= n - 1; e++)
    {
        for (c = 0; c <= n - 2; c++)
        {
            d = 0;
            if (b[c] == e)
            {
                d = 1;
                break;
            }
        }
        if (d != 1)
            break;
    }
    if (d != 1)
        printf("Not jolly");
    else
        printf("Jolly");
    return 0;

}